#!/usr/bin/env python  
# encoding: utf-8   

""" 
@version: v1.0 
@author: null 
@software: PyCharm 
@file: main.py 
@time: 2017.4.29 9:24 
"""

from weibo.models.blogs import Blogs
from weibo.models.like import Like
import weibo.settings as config
from weibo.models.follow import Follow

if __name__ == "__main__":
    print("start")

    #username= input("请输入用户名:")
    #password= input("请输入密码:")


    config.username=''
    config.password=''
    #blog = Blogs()
    #result = blog.sendComment("aaaaaaaa","4104061290607771")
    #result = blog.rtBlog("rt————————", "4104061290607771")
    #print(result)

    #herblogs = blog.getHerselfBlogs("1640571365",1)
    #print(herblogs)

    #search = blog.search("罗永浩")
    #获取搜索后的第一个博主id
    #print(search.get("cards")[0].get("card_group")[0].get("user").get("id"))

    # jsonstr = blog.getMyselfBlogs(2)
    # print(jsonstr)
    # card_group = jsonstr[0].get("card_group")
    # print(card_group)
    # card = card_group[0]
    # mblog = card.get("mblog")
    # blogId = mblog.get("mid")
    # print(blogId)

    follow = Follow()
    #result = follow.followAdd("1640571365")
    result = follow.followDelete("1640571365")
    print(result)

    # like = Like()

    # result = like.likeAdd(blogId)
    # print(result)
    # result = like.likeDelete(blogId)
    # print(result)
    #1640571365
    pass
